<?php

/*
 * модель юзера
 */
class Model_User{
    protected $userData = array(
        'id' => '1',
        'name' => null,
        'login' => null,
        'password' => null,
        'sex' => null,
        'age' => null,
        'ava' => null
    );

    public function __construct($data = null){
        if(isset($data)){
            foreach($data as $key => $val){
                $this->userData[$key] = $val;
            } 
        } 
    }
    public function getUserAva(){
        return $this->userData['ava'];
    }
    public function getUserData(){
        return $this->userData;
    }
    
    public function getUserId() {
        return $this->userData['id'];
    }

    public function getUserLog() {
        return $this->userData['login'];
    }

    public function getUserPas() {
        return $this->userData['password'];
    }

    public function getUserName() {
        return $this->userData['name'];
    }

    public function getUserSex() {
        return $this->userData['sex'];
    }

    public function getUserAge() {
        return $this->userData['age'];
    }
}
